<?PHP 

// MinBS - Minimalist Blogging System
// Developed by Juliano "tibone" Flores
// http://code.google.com/p/minbs

$username = $_POST['username'];
$password = $_POST['password'];

require_once('required.php');


$query_user = "SELECT * FROM minbs_users where name = '$username' and password = '$password'";
$user_results = mysql_query($query_user,$connection);


if(mysql_num_rows($user_results) > 0) { 
  session_start();
  $_SESSION['minbs'] = "logged";
  $_SESSION['poster'] = $username;
  header("location:admin.php");
}

  header("location:index.php");

?>
